<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>Home</title>
		<!--bootstarp-css-->
		<link href="../css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
		<!--/bootstarp-css -->
		<!--css-->
		<link rel="stylesheet" href="../css/style.css" type="text/css" media="all" />
		<link href="../css/hover.css" rel="stylesheet" media="all">
		<link href="../css/bootstrap.min.css" rel="stylesheet" />
		<link href="../css/material-dashboard.css" rel="stylesheet" />
		<script src="../js/jquery-3.1.0.min.js"></script>
		<script src="../js/bootstrap.min.js" type="text/javascript"></script>
		<!--/css-->
		<script type="application/x-javascript">
			addEventListener("load", function() {
				setTimeout(hideURLbar, 0);
			}, false);

			function hideURLbar() {
				window.scrollTo(0, 1);
			}
		</script>
		<script src="../js/jquery.min.js"></script>
		<script src="../js/modernizr.custom.js"></script>
		<script src="../js/responsiveslides.min.js"></script>
		<script src="../js/jquery-3.2.1.min.js"></script>
		
		<style>
			h1,
			h2,
			h3,
			h4,
			h5,
			h6,
			p,
			span {
				margin: 0;
				padding: 0;
			}

			.menu a {
				font-size: 14px;
			}

			#yincan {
				width: 160px;
				height: 110px;
				position: absolute;
				top: 70px;
				right: 46px;
				background-color: #fff;
				display: none;
			}
		</style>
		<style>
			.form-control1,
			.form-control2 {
				width: 85%;
				height: 34px;
				font-size: 14px;
				line-height: 1.42857143;
				color: #555555;
				background-color: #fff;
				background-image: none;
				border: 1px solid #ccc;
				border-radius: 4px;
				transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
			}

			.form-control2 {
				width: 70%;
				height: 34px;
				font-size: 14px;
				line-height: 1.42857143;
				color: #555555;
				background-color: #fff;
				background-image: none;
				border: 1px solid #ccc;
				border-radius: 4px;
				transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
			}

			.form-control1:focus,
			.form-control2:focus {
				border-color: #66afe9;
				outline: 0;
				-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, 0.6);
				box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, 0.6);
			}

			.sidebar[data-color="purple"] .nav li.active a,
			.off-canvas-sidebar[data-color="purple"] .nav li.active a {
				background-color: #0c8687;
				box-shadow: 0 12px 20px -10px rgba(0, 190, 139, 0.3), 0 4px 20px 0px rgba(0, 208, 153, 0.1), 0 7px 8px -5px rgba(0, 153, 112, 0.2);
			}

			.modal-body button {
				width: 100px;
				height: 100px;
				border-radius: 50%;
				margin: 20px;
			}

			.aui-info {
				position: relative;
				width: 400px;
				height: auto;
				text-align: center;
				margin: 0 auto;
			}

			.aui-img-round {
				width: 100px;
				height: 100px;
				border-radius: 50%;
				border: 1px #ccc solid;
			}

			.fileInput {
				width: 6.25rem;
				height: 100px;
				position: absolute;
				top: 65px;
				/* bottom: 300px; */
				left: 0;
				right: 0;
				opacity: 0;
				display: block;
				width: 100px;
				clear: both;
				display: block;
				margin: auto;
				background-color: red;
			}

			.fileInput1 {
				width: 6.25rem;
				height: 100px;
				position: absolute;
				top: 0;
				/* bottom: 300px; */
				left: 0;
				right: 0;
				opacity: 0;
				display: block;
				width: 100px;
				clear: both;
				display: block;
				margin: auto;
				background-color: red;
			}

			.info1 {
				width: 500px;
				margin-top: 15px;
				height: 230px;
				text-align: center;
			}

			.info1 div {
				float: left;
				width: 250px;
				height: 60px;
			}
		</style>
		<style>
			/* 分页 */
			.page-container a,
			.page-container a:hover {
				color: #0c8687;
				font-size: 14px;
				text-decoration: none;
			}

			.pagination>.active>a,
			.pagination>.active>span,
			.pagination>.active>a:hover,
			.pagination>.active>span:hover,
			.pagination>.active>a:focus,
			.pagination>.active>span:focus {
				z-index: 3;
				color: #fff;
				cursor: default;
				background-color: #0c8687;
				border-color: #0c8687;
			}

			.pagination>li>a {
				color: rgb(187, 187, 187);
			}

			.pagination input {
				outline: none;
				border-radius: 4px;
				width: 60px;
				height: 34px;
				outline: none;
				border: 1px #DDDDDD solid;
				text-align: center;
			}

			#go-page1,
			#go-page2,
			#go-page3,
			#go-page4,
			#go-page5 {
				border: 1px #0c8687 solid;
				color: #fff;
				background: #0c8687;
			}

			.main-panel {
				width: calc(100% - 240px);
			}

			.wrapper {
				width: 51%;
				margin: 47px auto 0;
				height: 66vh;
			}

			.sidebar .sidebar-wrapper {
				width: 220px;
				height: calc(65vh - 75px);
			}

			/* 表格 */
			.tablelist {
				width: 100%;
				height: 100%;
				/* border: 1px #0c8687 solid; */
				/* margin-top: 70px; */
			}

			.table-user {
				width: 100%;
				border-collapse: collapse;
				margin: 0 auto;
			}

			.table-user caption {
				/* font-size: 2em; */
				font-weight: bold;
				/* margin: 1em 0; */
			}

			.table-user caption div {
				float: right;
			}

			.table-user caption input {
				width: 260px;
				height: 36px;
				color: #0c8687;
				border: 1px #0c8687 solid;
				border-radius: 5px;
			}

			th,
			td {
				border: 1px solid #ddddddc9;
				text-align: center;
				/* padding: 10px 0; */
			}

			.table-user thead tr {
				background-color: #008c8c;
				color: #fff;
			}

			.table-user thead tr th {
				padding: 10px 0;
			}

			.table-user tbody tr:nth-child(odd) {
				background-color: #eee;
			}

			.table-user tbody tr:hover {
				background-color: #0c868773;
			}

			.table-user tbody tr td:first-child {
				color: #0c8687;
			}

			.table-user tfoot tr td {
				text-align: right;
				padding-right: 20px;
				border: none;
			}

			.pull-left li a:hover {
				background-color: #0c8687;
				border-radius: 30px;
				color: #fff;
			}

			.msg {
				display: none;
			}

			.choose-petinfo,
			.choose-adopt,
			.choose-mymsg {
				background-color: #0c8687;
				border-radius: 30px;
				color: #fff;
			}

			.page-tfoot {
				display: none;
			}

			.aui-info table {
				width: 500px;
				height: 320px;
			}

			/* 我的信息 */
			#form2 {
				display: block;
				position: relative;
				top: 100px;
				margin-left: 100px;
				display: none;
			}

			#form2 table {
				width: 500px;
				height: 170px;
			}

			#form2 table td,
			.aui-info table td {
				border: none;
			}

			#form2 table td:first-child,
			.aui-info table td:first-child {
				text-align: right;
			}

			#form2 table td:last-child,
			.aui-info table td:last-child {
				text-align: left;
			}

			.panel-mepet,
			.panel-mycollection,
			.panel-myfabu,
			.panel-mymessage,
			.panel-myorder,
			.panel-mylike{
				display: none;
			}

			.foster,
			.order,
			.youmsg,
			.forum {
				display: none;
			}
		</style>

	</head>
	<body id="box1">
		<!-- 模态框（Modal）   我的宠物详情显示 -->
		<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="gridSystemModalLabel">
			<div class="modal-dialog" role="document">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
								aria-hidden="true">&times;</span></button>
						<h4 class="modal-title" id="gridSystemModalLabel">宠物资料显示</h4>
					</div>
					<form action="#" method="post" id="form3" enctype="multipart/form-data">
						<div class="modal-body">

							<div class="aui-info">
								<img src="../images/6.jpg" id="img-petdetail"
									style="width: 100px;height: 100px;border-radius: 50%;"
									class="aui-img-round user-img" />
								<input type="file" accept="image/*" id="file-petdetail" name="file"
									onchange="upload('#file-petdetail', '#img-petdetail');" class="fileInput1"
									value="" />
							</div>
							<div class="aui-info info1" style="height: 160px;">
								<div>
									<span>名称：<input type="text" id="petname" class="form-control2" value="" /></span>
								</div>
								<div>
									<span>性别：<input type="text" id="petsex" class="form-control2" value="" /></span>
								</div>
								<div>
									<span>品种：<select id="petpz1" class="form-control2">
											<option value="0" selected>请选择</option>
										</select>
									</span>
								</div>
								<div>
									<span>生日：<input type="text" id="petborn" class="form-control2" value="" /></span>
								</div>
								<div>
									<span>地址：<input type="text" id="petadrs" class="form-control2" value="" /></span>
								</div>
								<div>
									<span>邮箱：<input type="text" id="petemail" class="form-control2" value="" /></span>
								</div>
								<input type="hidden" id="upid" value="" />
							</div>
						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default" data-dismiss="modal"
								style="width: 90px;">取消</button>
							<button type="button" class="btn btn-primary update" style="width: 90px;">修改</button>
						</div>
					</form>
				</div><!-- /.modal-content -->
			</div><!-- /.modal-dialog -->
		</div><!-- /.modal -->

		<!-- 模态框（Modal）   添加我的宠物-->
		<div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="gridSystemModalLabel">
			<div class="modal-dialog" role="document">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
								aria-hidden="true">&times;</span></button>
						<h4 class="modal-title" id="gridSystemModalLabel">宠物资料显示</h4>
					</div>
					<form id="form4" action="#" method="post" enctype="multipart/form-data">
						<div class="modal-body">
							<div class="aui-info">
								<img src="../images/pet-avatar.png" id="img-petadd"
									style="width: 100px;height: 100px;border-radius: 50%;"
									class="aui-img-round user-img" />
								<input type="file" accept="image/*" id="file-petadd" name="file"
									onchange="upload('#file-petadd', '#img-petadd');" class="fileInput1" value="" />
							</div>
							<div class="aui-info info1">
								<div>
									<span>名称：<input type="text" id="pname" class="form-control2" value="" /></span>
								</div>
								<div>
									<span>性别：<input type="text" id="psex" class="form-control2" value="" /></span>
								</div>
								<div>
									<span>品种：<select id="petpz2" class="form-control2">
											<option value="0">请选择</option>
										</select></span>
								</div>
								<div>
									<span>生日：<input type="text" id="pborn" class="form-control2" value="" /></span>
								</div>
								<div>
									<span>地址：<input type="text" id="padrs" class="form-control2" value="" /></span>
								</div>
								<div>
									<span>邮箱：<input type="text" id="pemail" class="form-control2" value="" /></span>
								</div>

							</div>


						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default" data-dismiss="modal"
								style="width: 90px;">取消</button>
							<button type="button" class="btn btn-success addpet" style="width: 90px;">添加</button>
						</div>
					</form>
				</div><!-- /.modal-content -->
			</div><!-- /.modal-dialog -->
		</div><!-- /.modal -->

		<!-- 模态框（Modal）   订单详情显示-->
		<div class="modal fade" id="myModal3" tabindex="-1" role="dialog" aria-labelledby="gridSystemModalLabel">
			<div class="modal-dialog" role="document">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
								aria-hidden="true">&times;</span></button>
						<h4 class="modal-title" id="gridSystemModalLabel">订单详情<span class="label label-success"
								id="orderstatus">已支付</span></h4>
					</div>
					<div class="modal-body">
						<form action="#" method="post" enctype="multipart/form-data">
							<div class="aui-info info1">
								<div>
									<span>订单号：<input type="text" id="orderid" class="form-control2" value=""
											disabled /></span>
								</div>
								<div>
									<span>订单名称：<input type="text" id="ordername" class="form-control2" value=""
											disabled /></span>
								</div>
								<div>
									<span>寄养店铺：<select id='dp' class="form-control2" disabled>
											<option value="0">请选择</option>
										</select></span>
								</div>
								<div>
									<span>宠物数量：<input type="text" id="petnum" class="form-control2" value=""
											disabled /></span>
								</div>
								<div>
									<span>总金额：<input type="text" id="moneys" class="form-control2" value=""
											disabled /></span>
								</div>
								<div>
									<span>起始日期：<input type="text" id="startdate" class="form-control2" value=""
											disabled /></span>
								</div>
								<div>
									<span>结束日期：<input type="text" id="enddate" class="form-control2" value=""
											disabled /></span>
								</div>
								<div>
									<span>订单日期：<input type="text" id="orderdate" class="form-control2" value=""
											disabled /></span>
								</div>
							</div>
							<div class="aui-info"
								style="width: 500px;height: 105px;position: relative;text-align: right;">
								<span style="position: absolute;top: 10px;left: 0;">备注：</span>
								<textarea disabled style="width: 86%;height: 70px;" id="remark"
									class="form-control1"></textarea>
							</div>
						</form>

					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-success" style="width: 90px;" id="zhifu2"
							onclick="zhifu()">支付</button>
						<button type="button" class="btn btn-default" data-dismiss="modal"
							style="width: 90px;">取消</button>
					</div>
				</div><!-- /.modal-content -->
			</div><!-- /.modal-dialog -->
		</div><!-- /.modal -->

		<!-- 模态框（Modal）   领养详情显示-->
		<div class="modal fade" id="myModal4" tabindex="-1" role="dialog" aria-labelledby="gridSystemModalLabel">
			<div class="modal-dialog" role="document">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
								aria-hidden="true">&times;</span></button>
						<h4 class="modal-title" id="gridSystemModalLabel">领养资料显示</h4>
					</div>
					<form action="#" method="post" enctype="multipart/form-data">
						<div class="modal-body">
							<div class="aui-info">
								<img src="../images/6.jpg" id="img-adopt"
									style="width: 100px;height: 100px;border-radius: 50%;"
									class="aui-img-round user-img" />
								<input type="file" accept="image/*" id="file-adopt" name="file"
									onchange="upload('#file-adopt', '#img-adopt');" class="fileInput1" value="" />
							</div>
							<div class="aui-info info1" style="height: 180px;">
								<div>
									<span>标题：<input type="text" id="adopttitle" class="form-control2" value="" /></span>
								</div>
								<div>
									<span>宠物：<select id="aupid" disabled class="form-control2">
											<option value="0">请选择</option>
										</select></span>
								</div>
								<div>
									<span>地址：<input type="text" id="petdz" class="form-control2" value="" /></span>
								</div>
								<div>
									<span>联系人：<input type="text" id="lxr" class="form-control2" value="" /></span>
								</div>
								<div>
									<span>联系电话：<input type="text" id="lxdh" class="form-control2" value="" /></span>
								</div>
								<div>
									<span>发布日期：<input type="text" id="fabudate" class="form-control2" value="" /></span>
								</div>
								<input type="hidden" id="aid" value="" />
							</div>
							<div class="aui-info"
								style="width: 500px;height: 105px;position: relative;text-align: right;">
								<span style="position: absolute;top: 10px;left: 0;">详情描述：</span>
								<textarea style="width: 86%;height: 70px;" id="adoptdetail"
									class="form-control1"></textarea>
							</div>

						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default" data-dismiss="modal"
								style="width: 90px;">取消</button>
							<button type="button" class="btn btn-primary updateadopt" style="width: 90px;">修改</button>
						</div>
					</form>
				</div><!-- /.modal-content -->
			</div><!-- /.modal-dialog -->
		</div><!-- /.modal -->

		<!-- 模态框（Modal）   寻宠详情显示-->
		<div class="modal fade" id="myModal5" tabindex="-1" role="dialog" aria-labelledby="gridSystemModalLabel">
			<div class="modal-dialog" role="document">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
								aria-hidden="true">&times;</span></button>
						<h4 class="modal-title" id="gridSystemModalLabel">寻宠详情显示</h4>
					</div>
					<form action="#" method="post" enctype="multipart/form-data">
						<div class="modal-body">
							<div class="aui-info">
								<img src="../images/6.jpg" id="img-seek"
									style="width: 100px;height: 100px;border-radius: 50%;"
									class="aui-img-round user-img" />
								<input type="file" accept="image/*" id="file-seek" name="file"
									onchange="upload('#file-seek', '#img-seek');" class="fileInput1" value="" />
							</div>
							<div class="aui-info info1" style="height: 180px;">
								<div>
									<span>标题：<input type="text" id="stitle" class="form-control2" value="" /></span>
								</div>
								<div>
									<span>宠物：<select id="supid" disabled class="form-control2">
											<option value="0">请选择</option>
										</select></span>
								</div>
								<div>
									<span>丢失地址：<input type="text" id="sdz" class="form-control2" value="" /></span>
								</div>
								<div>
									<span>联系电话：<input type="text" id="sdh" class="form-control2" value="" /></span>
								</div>
								<div>
									<span>丢失日期：<input type="text" id="sdate" class="form-control2" value="" /></span>
								</div>
								<input type="hidden" id="seekid" value="" />
							</div>
							<div class="aui-info"
								style="width: 500px;height: 105px;position: relative;text-align: right;">
								<span style="position: absolute;top: 10px;left: 0;">详情描述：</span>
								<textarea style="width: 86%;height: 70px;" id="sdetail"
									class="form-control1"></textarea>
							</div>

						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default" data-dismiss="modal"
								style="width: 90px;">取消</button>
							<button type="button" class="btn btn-primary updateseek" style="width: 90px;">修改</button>
						</div>
					</form>
				</div><!-- /.modal-content -->
			</div><!-- /.modal-dialog -->
		</div><!-- /.modal -->

		<!-- 模态框（Modal）   招领详情显示-->
		<div class="modal fade" id="myModal6" tabindex="-1" role="dialog" aria-labelledby="gridSystemModalLabel">
			<div class="modal-dialog" role="document">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
								aria-hidden="true">&times;</span></button>
						<h4 class="modal-title" id="gridSystemModalLabel">招领详情显示</h4>
					</div>
					<form action="#" method="post" enctype="multipart/form-data">
						<div class="modal-body">
							<div class="aui-info">
								<img src="../images/6.jpg" id="img-found"
									style="width: 100px;height: 100px;border-radius: 50%;"
									class="aui-img-round user-img" />
								<input type="file" accept="image/*" id="file-found" name="file"
									onchange="upload('#file-found', '#img-found');" class="fileInput1" value="" />
							</div>
							<div class="aui-info info1" style="height: 180px;">
								<div>
									<span>标题：<input type="text" id="ftitle" class="form-control2" value="" /></span>
								</div>
								<div>
									<span>品种：<select id="bid" class="form-control2">
											<option value="0">请选择</option>
										</select></span>
								</div>
								<div>
									<span>拾到地址：<input type="text" id="fdz" class="form-control2" value="" /></span>
								</div>
								<div>
									<span>联系电话：<input type="text" id="fdh" class="form-control2" value="" /></span>
								</div>
								<div>
									<span>拾到日期：<input type="text" id="fdate" class="form-control2" value="" /></span>
								</div>
								<input type="hidden" id="fid" value="" />
							</div>
							<div class="aui-info"
								style="width: 500px;height: 105px;position: relative;text-align: right;">
								<span style="position: absolute;top: 10px;left: 0;">详情描述：</span>
								<textarea style="width: 86%;height: 70px;" id="fdetail"
									class="form-control1"></textarea>
							</div>

						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default" data-dismiss="modal"
								style="width: 90px;">取消</button>
							<button type="button" class="btn btn-primary updatefound" style="width: 90px;">修改</button>
						</div>
					</form>
				</div><!-- /.modal-content -->
			</div><!-- /.modal-dialog -->
		</div><!-- /.modal -->

		<!-- 模态框（Modal）   收藏帖子详情显示-->
		<div class="modal fade" id="myModal7" tabindex="-1" role="dialog" aria-labelledby="gridSystemModalLabel">
			<div class="modal-dialog" role="document">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
								aria-hidden="true">&times;</span></button>
						<h4 class="modal-title" id="gridSystemModalLabel">帖子详情显示<span id="audit"></span></h4>
					</div>
					<form action="#" method="post" enctype="multipart/form-data">
						<div class="modal-body">
							<div class="aui-info">
								<img src="../images/6.jpg" id="img-forum"
									style="width: 100px;height: 100px;border-radius: 50%;"
									class="aui-img-round user-img" />
								<input type="file" accept="image/*" id="file-forum" name="file"
									onchange="upload('#file-forum', '#img-forum');" class="fileInput1" value="" />
							</div>
							<div class="aui-info info1" style="height: 60px;">
								<div>
									<span>标题：<input type="text" id="forumtitle" class="form-control2" value="" /></span>
								</div>
								<div>
									<span>发布日期：<input type="text" id="fbdate" class="form-control2" value="" /></span>
								</div>
								<input type="hidden" id="forumid" value="" />
							</div>
							<div class="aui-info"
								style="width: 500px;height: 105px;position: relative;text-align: right;">
								<span style="position: absolute;top: 10px;left: 0;">详情描述：</span>
								<textarea style="width: 86%;height: 70px;" id="forumdetail"
									class="form-control1"></textarea>
							</div>

						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default" data-dismiss="modal"
								style="width: 90px;">取消</button>
							<button type="button" class="btn btn-primary updateforum" style="width: 90px;">修改</button>
						</div>
					</form>
				</div><!-- /.modal-content -->
			</div><!-- /.modal-dialog -->
		</div><!-- /.modal -->

		<!-- 模态框（Modal）   我发送消息详情显示-->
		<div class="modal fade" id="myModal8" tabindex="-1" role="dialog" aria-labelledby="gridSystemModalLabel">
			<div class="modal-dialog" role="document">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
								aria-hidden="true">&times;</span></button>
						<h4 class="modal-title" id="gridSystemModalLabel">消息详情显示<span id="audit"></span></h4>
					</div>
					<form action="#" method="post" enctype="multipart/form-data">
						<div class="modal-body">
							<div class="aui-info info1" style="height: 60px;">
								<div>
									<span>接收用户：<input type="text" id="yhjs" class="form-control2" value="" /></span>
								</div>
								<div>
									<span>发送日期：<input type="text" id="msgdate" class="form-control2" value="" /></span>
								</div>
							</div>
							<div class="aui-info"
								style="width: 500px;height: 105px;position: relative;text-align: right;">
								<span style="position: absolute;top: 10px;left: 0;">详情描述：</span>
								<textarea style="width: 86%;height: 70px;" id="msgdetail"
									class="form-control1"></textarea>
							</div>

						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default upread" data-dismiss="modal"
								style="width: 90px;">取消</button>	
						</div>
					</form>
				</div><!-- /.modal-content -->
			</div><!-- /.modal-dialog -->
		</div><!-- /.modal -->
         <!-- 模态框（Modal）   我接收消息详情显示-->
		<div class="modal fade" id="myModal9" tabindex="-1" role="dialog" aria-labelledby="gridSystemModalLabel">
			<div class="modal-dialog" role="document">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
								aria-hidden="true">&times;</span></button>
						<h4 class="modal-title" id="gridSystemModalLabel">消息详情显示<span id="audit"></span></h4>
					</div>
					<form action="#" method="post" enctype="multipart/form-data">
						<div class="modal-body">
							<div class="aui-info info1" style="height: 60px;">
								<div>
									<span>发送用户：<input type="text" id="yhfs" class="form-control2" value="" /></span>
								</div>
								<div>
									<span>发送日期：<input type="text" id="msgdate1" class="form-control2" value="" /></span>
								</div>
							</div>
							<div class="aui-info"
								style="width: 500px;height: 105px;position: relative;text-align: right;">
								<span style="position: absolute;top: 10px;left: 0;">详情描述：</span>
								<textarea style="width: 86%;height: 70px;" id="youmsgdetail"
									class="form-control1"></textarea>
							</div>

						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default upyouid" data-dismiss="modal" onclick="upread($(this))"
								style="width: 90px;">取消</button>
						</div>
					</form>
				</div><!-- /.modal-content -->
			</div><!-- /.modal-dialog -->
		</div><!-- /.modal -->
        
		<!-- 模态框（Modal）   点赞帖子详情显示-->
		<div class="modal fade" id="myModal10" tabindex="-1" role="dialog" aria-labelledby="gridSystemModalLabel">
			<div class="modal-dialog" role="document">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
								aria-hidden="true">&times;</span></button>
						<h4 class="modal-title" id="gridSystemModalLabel">帖子详情显示<span id="audit1"></span></h4>
					</div>
					<form action="#" method="post" enctype="multipart/form-data">
						<div class="modal-body">
							<div class="aui-info">
								<img src="../images/6.jpg" id="img-forum1"
									style="width: 100px;height: 100px;border-radius: 50%;"
									class="aui-img-round user-img" />
								<input type="file" accept="image/*" id="file-forum1" name="file"
									onchange="upload('#file-forum1', '#img-forum1');" class="fileInput1" value="" />
							</div>
							<div class="aui-info info1" style="height: 60px;">
								<div>
									<span>标题：<input type="text" id="forumtitle1" class="form-control2" value="" /></span>
								</div>
								<div>
									<span>发布日期：<input type="text" id="fbdate1" class="form-control2" value="" /></span>
								</div>
								<input type="hidden" id="forumid1" value="" />
							</div>
							<div class="aui-info"
								style="width: 500px;height: 105px;position: relative;text-align: right;">
								<span style="position: absolute;top: 10px;left: 0;">详情描述：</span>
								<textarea style="width: 86%;height: 70px;" id="forumdetail1"
									class="form-control1"></textarea>
							</div>
		
						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default" data-dismiss="modal"
								style="width: 90px;">取消</button>	
						</div>
					</form>
				</div><!-- /.modal-content -->
			</div><!-- /.modal-dialog -->
		</div><!-- /.modal -->
		

   

		<!--header-->
		<div class="header">
			<div class="header-info">
				<div class="container">
					<div class="logo">
						<a href="index.html"><img src="../images/logo-pet.png" style="position: absolute;width: 330px;height: 262px;top: -60px;left: 280px;"/></a>
					</div>
					<div class="search-box">
						<form>
							<input type="text" name="s" class="textbox" placeholder="Search" required="">
							<input type="submit" value="">
						</form>
					</div>
					<div class="clearfix"> </div>
				</div>
			</div>
		</div>
		<div class="container">
			<div class="header-bottom">
				<div class="menu">
					<span class="menu-info"> </span>
					<ul class="cl-effect-21">
						<li id='oneser'><a id="service" href="index.html" class="active">服务中心</a>
							<div id="yican">
								<div>
									<p><a href="adopt.html">宠物领养</a></p>
									<p><a href="farmed.html">宠物寄养</a></p>
									<p><a href="notice.html">寻宠|招领</a></p>
								</div>
							</div>
						</li>
						<li><a href="petbaike.html">宠物百科</a></li>
						<li><a href="news.html">宠物新闻</a></li>
						<li><a href="bbs.html">宠物论坛</a></li>
						<li><a >关于我们</a></li>
						<li id="twoser">
							<a id="myme">个人中心</a>
							<div id="yincan">
								<div>
									<p><a href="myinfo.html">我的</a></p>
									<p><a id="overpet">注销</a></p>
								</div>
							</div>
						</li>
					</ul>
				</div>

				<!--yican 注销-->
				<script type="text/javascript">
					$("#service").mouseenter(function() {
						$("#yican").css("display", "block");
					});
					$("#oneser").mouseleave(function() {
						$("#yican").css("display", "none");
					});
					$("#myme").mouseenter(function() {
						$("#yincan").css("display", "block");
					});
					$("#twoser").mouseleave(function() {
						$("#yincan").css("display", "none");
					});
					//注销
					$("#overpet").click(function() {
						if (!confirm('是否确定注销该用户并退出登录？'))
							return;
						$.post('http://localhost:80/ct/remove', function(res) {
							if (res) {
								location.href = 'login.html';
							}
						});
					})
				</script>
				<!-- /yican -->
				<!--script-nav -->
				<script>
					$("span.menu-info").click(function() {
						$("ul.cl-effect-21").slideToggle("slow", function() {});
					});
				</script>
				<!-- /script-nav -->
				<div class="clearfix"> </div>
			</div>
		</div>
		<!--/header-->


		<div class="wrapper">
			<div class="sidebar" data-color="purple" data-image="../assets/img/sidebar-1.jpg">
				<div class="sidebar-wrapper">
					<ul class="nav nav1">
						<li class="active">
							<a id="myinfo">
								<p>我的信息</p>
							</a>
						</li>
						<li>
							<a id="mepet">
								<p>我的宠物</p>
							</a>
						</li>
						<li>
							<a id="myorder">
								<p>我的订单</p>
							</a>
						</li>
						<li>
							<a id="myfabu">
								<p>我的发布</p>
							</a>
						</li>
						<li>
							<a id="mycollection">
								<p>我的收藏</p>
							</a>
						</li>
						<li>
							<a id="mylike">
								<p>我的喜欢</p>
							</a>
						</li>
						<li>
							<a id="mymessage">
								<p>消息中心</p>
							</a>
						</li>

					</ul>
				</div>
			</div>
			<div class="main-panel">
				<ul class="nav nav-pills pull-left panel-myinfo" style="width: 100%;margin-top: 20px;">
					<li>
						<a href="javascript:void(0)" class="choose-petinfo" style="color: #fff">我的信息</a>
					</li>
					<li>
						<a href="javascript:void(0)" class="choose-msg"
							style="color: rgb(27, 36, 47);background-color: #dddddd9c;">修改密码</a>
					</li>
				</ul>
				<!-- 我的信息 -->
				<div class="tablelist panel-myinfo">
					<form id="form1" onsubmit="return false" action="#" method="post" enctype="multipart/form-data">
						<div class="aui-info">
							<img src="../images/pet-avatar.png" id="img-txz"
								style="width: 100px;height: 100px;border-radius: 50%;" class="aui-img-round user-img" />
							<input type="file" accept="image/*" id="file-txz" name="file"
								onchange="upload('#file-txz', '#img-txz');" class="fileInput" value="" />
						</div>
						<div class="aui-info info1">
							<table>
								<tr>
									<td>用户名：</td>
									<td><input type="text" name="username" id="username" class="form-control1" /></td>
								</tr>
								<tr>
									<td>性别：</td>
									<td><input type="text" name="sex" id="sex" class="form-control1" /></td>
								</tr>
								<tr>
									<td>邮箱：</td>
									<td><input type="text" name="email" id='email' class="form-control1" /></td>
								</tr>
								<tr>
									<td>手机号码：</td>
									<td><input type="text" id="phone" name="phone" class="form-control1" /></td>
								</tr>
								<tr>
									<td>生日：</td>
									<td><input type="text" id="born" name="borndate" class="form-control1" /></td>
								</tr>
								<tr>
									<td>地址：</td>
									<td><input type="text" id="adrs" name="faddress" class="form-control1" /></td>
								</tr>
							</table>
							<button class="btn btn-primary upuser" style="margin: 10px 0 0 310px;">修改</button>
						</div>
					</form>
					<form id="form2" action="#" method="post">
						<table>
							<tr>
								<td>旧密码：</td>
								<td><input type="password" id="oldpwd" class="form-control1" value="" /><span id="yzold"
										class="label label-success"
										style="position: absolute;top: 84px;right: 110px;display: none;">验证成功</span>
								</td>
							</tr>
							<tr>
								<td>新密码：</td>
								<td><input type="password" id="newpwd" disabled class="form-control1" value="" /></td>
							</tr>
							<tr>
								<td>确认密码：</td>
								<td><input type="password" id="tpwd" disabled class="form-control1" value="" /></td>
							</tr>
						</table>
						<button class="btn btn-primary" style="margin: 10px 0 0 310px;">修改</button>
					</form>
				</div>
				<!-- 我的宠物 -->
				<div class="tablelist panel-mepet">
					<table class="table-user" style="position: relative;">
						<caption>
							<button class="btn btn-success btn-sm" data-toggle="modal"
								data-target="#myModal2">添加宠物</button>
						</caption>
						<thead class="petinfo">
							<tr>
								<th>宠物头像</th>
								<th>宠物名称</th>
								<th>宠物性别</th>
								<th>宠物生日</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody class="petinfo petinfo1 mypetinfo">
							<!-- <tr>
								<td><img src="../images/9.jpg" width="50px" /></td>
								<td>柠檬</td>
								<td>母</td>
								<td>08-20</td>
								<td><button class="btn btn-info btn-sm" data-toggle="modal"
										data-target="#myModal">详情</button></td>
							</tr> -->
						</tbody>
						<tfoot class="page-tfoot">
							<tr>
								<td colspan="10">
									<div class="text-center hidden-xs" style="margin-left: 256px;text-align: right;">
										<ul class="pagination">
											<li class="active"><a href="javascript:void(0)" id="firstpage1"
													title="首页">首页</a></li>
											<li><a href="javascript:void(0)" id="prevpage1" title="上一页">上一页</a></li>
											<li><a href="javascript:void(0)" id="nextpage1" title="下一页">下一页</a></li>
											<li><a href="javascript:void(0)" id="lastpage1" title="最后一页">尾页</a></li>
											<li style="margin-left: 20px;">第<input type="text" id="pagenum1"
													value="1" />页
												<input type="button" value="GO" id="go-page1" style="" />
											</li>
										</ul>
									</div>
								</td>
							</tr>
						</tfoot>
					</table>
				</div>
				<!-- 我的订单 -->
				<div class="tablelist panel-myorder">
					<table class="table-user" style="position: relative;">
						<caption>
							<a href="farmed.html"><button class="btn btn-success btn-sm">去下单</button></a>
						</caption>
						<thead class="petinfo">
							<tr>
								<th>订单号</th>
								<th>订单名称</th>
								<th>当前状态</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody class="petinfo petinfo1 myorder">
						</tbody>
						<tfoot class="page-tfoot">
							<tr>
								<td colspan="10">
									<div class="text-center hidden-xs" style="margin-left: 256px;text-align: right;">
										<ul class="pagination">
											<li class="active"><a href="javascript:void(0)" id="firstpage2"
													title="首页">首页</a></li>
											<li><a href="javascript:void(0)" id="prevpage2" title="上一页">上一页</a></li>
											<li><a href="javascript:void(0)" id="nextpage2" title="下一页">下一页</a></li>
											<li><a href="javascript:void(0)" id="lastpage2" title="最后一页">尾页</a></li>
											<li style="margin-left: 20px;">第<input type="text" id="pagenum2"
													value="1" />页
												<input type="button" value="GO" id="go-page2 style="" />
											</li>
										</ul>
									</div>
								</td>
							</tr>
						</tfoot>
					</table>

				</div>
				<!-- 我的发布 -->
				<div class=" tablelist panel-myfabu">
												<div class="tablelist">
													<table class="table-user">
														<caption>
															<ul class="nav nav-pills pull-left">
																<li>
																	<a href="javascript:void(0)" class="choose-adopt"
																		style="color: #fff">我的领养</a>
																</li>
																<li>
																	<a href="javascript:void(0)" class="choose-foster"
																		style="color: rgb(27, 36, 47);background-color: #dddddd9c;">我的寻宠启事</a>
																</li>
																<li>
																	<a href="javascript:void(0)" class="choose-order"
																		style="color: rgb(27, 36, 47);background-color: #dddddd9c;">我的招领启事</a>
																</li>
																<li>
																	<a href="javascript:void(0)" class="choose-forum"
																		style="color: rgb(27, 36, 47);background-color: #dddddd9c;">我的帖子</a>
																</li>
															</ul>
														</caption>
														<thead class="adopt">
															<tr>
																<th>领养编号</th>
																<th>发布标题</th>
																<th>发布日期</th>
																<th>操作</th>
															</tr>
														</thead>
														<tbody class="adopt adopt1"></tbody>
														<thead class="foster">
															<tr>
																<th>寻宠编号</th>
																<th>标题</th>
																<th>丢失日期</th>
																<th>操作</th>
															</tr>
														</thead>
														<tbody class="foster foster1">
														</tbody>
														<thead class="order">
															<tr>
																<th>招领编号</th>
																<th>标题</th>
																<th>拾到日期</th>
																<th>操作</th>
															</tr>
														</thead>
														<tbody class="order founds">
														</tbody>
														<thead class="forum">
															<tr>
																<th>帖子编号</th>
																<th>标题</th>
																<th>发布日期</th>
																<th>操作</th>
															</tr>
														</thead>
														<tbody class="forum forum1">
														</tbody>

														<tfoot class="page-tfoot">
															<tr>
																<td colspan="10">
																	<div class="text-center hidden-xs"
																		style="margin-left: 256px;text-align: right;">
																		<ul class="pagination">
																			<li class="active"><a
																					href="javascript:void(0)"
																					id="firstpage3" title="首页">首页</a>
																			</li>
																			<li><a href="javascript:void(0)"
																					id="prevpage3" title="上一页">上一页</a>
																			</li>
																			<li><a href="javascript:void(0)"
																					id="nextpage3" title="下一页">下一页</a>
																			</li>
																			<li><a href="javascript:void(0)"
																					id="lastpage3" title="最后一页">尾页</a>
																			</li>
																			<li style="margin-left: 20px;">第<input
																					type="text" id="pagenum3"
																					value="1" />页
																				<input type="button" value="GO"
																					id="go-page3" style="" />
																			</li>
																		</ul>
																	</div>
																</td>
															</tr>
														</tfoot>
													</table>
												</div>
				</div>				
				<!-- 我的收藏 -->
				<div class="tablelist panel-mycollection">
					<table class="table-user" style="position: relative;">
						<caption>
							<a href="bbs.html"><button class="btn btn-success btn-sm">去收藏</button></a>
						</caption>
						<thead class="petinfo">
							<tr>
								<th>收藏编号</th>
								<th>收藏信息</th>
								<th>收藏日期</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody class="petinfo petinfo1 coll">
							<!-- <tr>
								<td>222</td>
								<td>...</td>		
								<td>2022-11-11 23:23:23</td>
								<td>
									<button class="btn btn-danger btn-sm">删除</button>
									<button class="btn btn-danger btn-sm">删除</button>
								</td>
							</tr> -->
						</tbody>
						<tfoot class="page-tfoot">
							<tr>
								<td colspan="10">
									<div class="text-center hidden-xs"
										style="margin-left: 256px;text-align: right;">
										<ul class="pagination">
											<li class="active"><a href="javascript:void(0)"
													id="firstpage4" title="首页">首页</a></li>
											<li><a href="javascript:void(0)" id="prevpage4"
													title="上一页">上一页</a></li>
											<li><a href="javascript:void(0)" id="nextpage4"
													title="下一页">下一页</a></li>
											<li><a href="javascript:void(0)" id="lastpage4"
													title="最后一页">尾页</a></li>
											<li style="margin-left: 20px;">第<input type="text"
													id="pagenum4" value="1" />页
												<input type="button" value="GO" id="go-page4"
													style="" />
											</li>
										</ul>
									</div>
								</td>
							</tr>
						</tfoot>
					</table>
				
				</div>		
				<!-- 我的喜欢 （点赞）-->
				<div class="tablelist panel-mylike">
					<table class="table-user" style="position: relative;">
					<caption>
						<a href="bbs.html"><button class="btn btn-success btn-sm">去点赞</button></a>
					</caption>
									<thead class="petinfo">
										<tr>
											<th>点赞编号</th>
											<th>帖子信息</th>
											<th>点赞日期</th>
											<th>操作</th>
										</tr>
									</thead>
									<tbody class="petinfo petinfo1 mylikeinfo">
										<!-- <tr>
											<td>222</td>
											<td>...</td>		
											<td>2022-11-11 23:23:23</td>
											<td>
												<button class="btn btn-danger btn-sm">删除</button>
												<button class="btn btn-danger btn-sm">删除</button>
											</td>
										</tr> -->
									</tbody>
									<tfoot class="page-tfoot">
										<tr>
											<td colspan="10">
												<div class="text-center hidden-xs"
													style="margin-left: 256px;text-align: right;">
													<ul class="pagination">
														<li class="active"><a href="javascript:void(0)"
																id="firstpage4" title="首页">首页</a></li>
														<li><a href="javascript:void(0)" id="prevpage4"
																title="上一页">上一页</a></li>
														<li><a href="javascript:void(0)" id="nextpage4"
																title="下一页">下一页</a></li>
														<li><a href="javascript:void(0)" id="lastpage4"
																title="最后一页">尾页</a></li>
														<li style="margin-left: 20px;">第<input type="text"
																id="pagenum4" value="1" />页
															<input type="button" value="GO" id="go-page4"
																style="" />
														</li>
													</ul>
												</div>
											</td>
										</tr>
									</tfoot>
								</table>
							
							</div>	
				<!-- 我的消息 -->
				<div class="tablelist panel-mymessage">
										<table class="table-user" style="position: relative;">
											<caption>
												<ul class="nav nav-pills pull-left">
													<li>
														<a href="javascript:void(0)" class="choose-mymsg"
															style="color: #fff">我发送</a>
													</li>
													<li>
														<a href="javascript:void(0)" class="choose-youmsg"
															style="color: rgb(27, 36, 47);background-color: #dddddd9c;">我接收</a>
													</li>
												</ul>
											</caption>
											<thead class="mymsg">
												<tr>
													<th>消息编号</th>
													<th>消息类型</th>
													<th>发送日期</th>
													<th>操作</th>
												</tr>
											</thead>
											<tbody class="mymsg mymsg1">
												<tr>
													<td>222</td>
													<td>求领养</td>
													<td>2022-11-11</td>
													
													<td>
														<button class="btn btn-danger btn-sm">删除</button>
														<button class="btn btn-danger btn-sm">删除</button>
													</td>
												</tr>
											</tbody>

											<thead class="youmsg">
												<tr>
													<th>消息编号</th>
													<th>消息类型</th>
													<th>发送日期</th>
													<th>当前</th>
													<th>操作</th>
												</tr>
											</thead>
											<tbody class="youmsg youmsg1">
												<tr>
													<td>222</td>
													<td>求领养</td>
													<td>2022-11-11</td>
													<td><span class="label label-success">已读</span></td>
													<td>
														<button class="btn btn-danger btn-sm">删除</button>
														<button class="btn btn-danger btn-sm">删除</button>
													</td>
												</tr>
											</tbody>


											<tfoot class="page-tfoot">
												<tr>
													<td colspan="10">
														<div class="text-center hidden-xs"
															style="margin-left: 256px;text-align: right;">
															<ul class="pagination">
																<li class="active"><a href="javascript:void(0)"
																		id="firstpage5" title="首页">首页</a></li>
																<li><a href="javascript:void(0)" id="prevpage5"
																		title="上一页">上一页</a></li>
																<li><a href="javascript:void(0)" id="nextpage5"
																		title="下一页">下一页</a></li>
																<li><a href="javascript:void(0)" id="lastpage5"
																		title="最后一页">尾页</a></li>
																<li style="margin-left: 20px;">第<input type="text"
																		id="pagenum5" value="1" />页
																	<input type="button" value="GO" id="go-page5"
																		style="" />
																</li>
															</ul>
														</div>
													</td>
												</tr>
											</tfoot>
										</table>

									</div>

				</div>

			</div>
			<!--footer-->
			<div class="footer">
				<div class="container">
					<div class="copy-rights">
						<p>Copyright &copy; 2023.Company <a target="_blank" href="index.html">you宠</a></p>
					</div>

				</div>
			</div>
			<!--/footer-->
	</body>

	<script>
		$(function() {
			//判断是否显示分页
			function ispage() {
				let len = $(".petinfo1 tr").length;
				if (len >= 10) {
					$(".page-tfoot").css("display", "table-footer-group");
				}
			}
			ispage();

			//切换导航栏改变状态
			function toggle() {
				$(".nav1 li a").click(function() {
					$(this).parent().attr("class", "active");
					$(this).parent().siblings().attr("class", "");
				})
			}
			toggle();
			//我的信息内容切换
			function togglemyinfo() {
				//点击切换
				$(".pull-left li a").click(function() {
					$(this).css("background-color", "#0c8687").css("border-radius", "30px").css("color",
						"#fff");
					$(this).parent("li").siblings().children().css("background-color", "#dddddd9c").css(
						"color",
						"rgb(27, 36, 47)");
				})
				// 点击我的信息
				$(".choose-petinfo").click(function() {
					$("#form2").css("display", "none");
					$("#form1").css("display", "block");
				})
				//点击修改密码
				$(".choose-msg").click(function() {
					$("#form1").css("display", "none");
					$("#form2").css("display", "block");
				})
				// 我的领养
				$(".choose-adopt").click(function() {
					$(".adopt").css("display", "table-row-group");
					$(".foster").css("display", "none");
					$(".order").css("display", "none");
					$(".forum").css("display", "none");
				})
				// 我的寻宠启事
				$(".choose-foster").click(function() {
					$(".adopt").css("display", "none");
					$(".foster").css("display", "table-row-group");
					$(".order").css("display", "none");
					$(".forum").css("display", "none");
				})
				//我的招领启事
				$(".choose-order").click(function() {
					$(".adopt").css("display", "none");
					$(".foster").css("display", "none");
					$(".forum").css("display", "none");
					$(".order").css("display", "table-row-group");
				})
				//我的帖子
				$(".choose-forum").click(function() {
					$(".adopt").css("display", "none");
					$(".foster").css("display", "none");
					$(".order").css("display", "none");
					$(".forum").css("display", "table-row-group");
				})
				// 我发送
				$(".choose-mymsg").click(function() {
					$(".youmsg").css("display", "none");
					$(".mymsg").css("display", "table-row-group");
				})
				//我接收
				$(".choose-youmsg").click(function() {
					$(".mymsg").css("display", "none");
					$(".youmsg").css("display", "table-row-group");
				})
			}
			togglemyinfo();	
		})

		$(function() {
		    //切换导航栏改变内容
		    function togglenav() {
		    	$("#myinfo").click(function() {
		    		$(".panel-myinfo").css('display', 'block');
		    		$(".panel-mepet").css('display', 'none');
		    		$(".panel-myorder").css('display', 'none');
		    		$(".panel-myfabu").css('display', 'none');
		    		$(".panel-mycollection").css('display', 'none');
		    		$(".panel-mymessage").css('display', 'none');
		    		$(".panel-mylike").css('display', 'none');
					myinfo();
		    	})
		    	$("#mepet").click(function() {
		    		$(".panel-myinfo").css('display', 'none');
		    		$(".panel-mepet").css('display', 'block');
		    		$(".panel-myorder").css('display', 'none');
		    		$(".panel-myfabu").css('display', 'none');
		    		$(".panel-mycollection").css('display', 'none');
		    		$(".panel-mymessage").css('display', 'none');
		    		$(".panel-mylike").css('display', 'none');
					mypet();
		    	})
		    	$("#myorder").click(function() {
		    		$(".panel-myinfo").css('display', 'none');
		    		$(".panel-mepet").css('display', 'none');
		    		$(".panel-myorder").css('display', 'block');
		    		$(".panel-myfabu").css('display', 'none');
		    		$(".panel-mycollection").css('display', 'none');
		    		$(".panel-mymessage").css('display', 'none');
		    		$(".panel-mylike").css('display', 'none');
					myorder();
		    	})
		    	$("#myfabu").click(function() {
		    		$(".panel-myinfo").css('display', 'none');
		    		$(".panel-mepet").css('display', 'none');
		    		$(".panel-myorder").css('display', 'none');
		    		$(".panel-myfabu").css('display', 'block');
		    		$(".panel-mycollection").css('display', 'none');
		    		$(".panel-mymessage").css('display', 'none');
		    		$(".panel-mylike").css('display', 'none');
					
		    	})
		    	$("#mycollection").click(function() {
		    		$(".panel-myinfo").css('display', 'none');
		    		$(".panel-mepet").css('display', 'none');
		    		$(".panel-myorder").css('display', 'none');
		    		$(".panel-myfabu").css('display', 'none');
		    		$(".panel-mycollection").css('display', 'block');
		    		$(".panel-mymessage").css('display', 'none');
		    		$(".panel-mylike").css('display', 'none');
					mycoll();
		    	})
		    	$("#mymessage").click(function() {
		    		$(".panel-myinfo").css('display', 'none');
		    		$(".panel-mepet").css('display', 'none');
		    		$(".panel-myorder").css('display', 'none');
		    		$(".panel-myfabu").css('display', 'none');
		    		$(".panel-mycollection").css('display', 'none');
		    		$(".panel-mymessage").css('display', 'block');
		    		$(".panel-mylike").css('display', 'none');
		    		youmsg();
					mymsg();
		    	})
		    	$("#mylike").click(function() {
		    		$(".panel-myinfo").css('display', 'none');
		    		$(".panel-mepet").css('display', 'none');
		    		$(".panel-myorder").css('display', 'none');
		    		$(".panel-myfabu").css('display', 'none');
		    		$(".panel-mycollection").css('display', 'none');
		    		$(".panel-mymessage").css('display', 'none');
		    		$(".panel-mylike").css('display', 'block');
					mylike();
		    	})
		    }
		    togglenav();
				
			myinfo();
			//我的基本信息
			function myinfo() {
				$.post('http://localhost:80/ct/myinfo', function(r) {
					console.log(r);
					$("#username").val(r.username);
					$("#sex").val(r.sex);
					$("#email").val(r.email);
					$("#phone").val(r.phone);
					$("#born").val(r.borndate);
					$("#adrs").val(r.faddress);
					$("#img-txz").attr("src", "../images/" + r.filename);
				}, "json");
			}

			//图片上传 修改信息
			$(".upuser").click(function() {				
				let user = $("#username").val();
				let sex = $("#sex").val();
				let phone = $("#phone").val();
				let adrs = $("#adrs").val();
				let born = $("#born").val();
				let email = $("#email").val();
				//非空验证
				if (user == '' || sex == '' || born == '' || phone == '' || adrs == '' || email == '') {
					if (user == '') {
						$("#username").css("border-color", "#a94442").css("box-shadow",
							"inset 0 1px 1px rgba(0,0,0,.075)");
					}
					if (sex == '') {
						$("#sex").css("border-color", "#a94442").css("box-shadow",
							"inset 0 1px 1px rgba(0,0,0,.075)");
					}
					if (born == '') {
						$("#born").css("border-color", "#a94442").css("box-shadow",
							"inset 0 1px 1px rgba(0,0,0,.075)");
					}
					if (phone == '') {
						$("#phone").css("border-color", "#a94442").css("box-shadow",
							"inset 0 1px 1px rgba(0,0,0,.075)");
					}
					if (adrs == '') {
						$("#adrs").css("border-color", "#a94442").css("box-shadow",
							"inset 0 1px 1px rgba(0,0,0,.075)");
					}
					if (email == '') {
						$("#email").css("border-color", "#a94442").css("box-shadow",
							"inset 0 1px 1px rgba(0,0,0,.075)");
					}
					alert("修改信息不能为空！");
					return;
				}
				if(sex != '男' && sex != '女'){
					alert("性别只能为男或女！");
					return false;
				}
				//手机格式验证
				var telStr = /^[1]([3-9])[0-9]{9}$/;
				if (!(telStr.test(phone))) {
					alert("手机格式不规范！");
					$("#phone").css("border-color", "#a94442").css("box-shadow",
						"inset 0 1px 1px rgba(0,0,0,.075)");
					return;
				}
				//邮箱验证
				var yx = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/;
				if (!(yx.test(email))) {
					alert("邮箱格式不规范！");
					$("#email").css("border-color", "#a94442").css("box-shadow",
						"inset 0 1px 1px rgba(0,0,0,.075)");
					return;
				}				
				var formData = new FormData();
				formData.append("sex", sex);
				formData.append("phone", phone);
				formData.append("email", email);
				formData.append("username", user);
				formData.append("faddress", adrs);
				formData.append("borndate", born);
				let f = document.getElementById('file-txz');
				let f1 = f.files[0];
				// 判断是否选择上传图片
				if ($("#file-txz").val() == '') {
					//不上传	
					$.post('http://localhost:80/ct/updateinfo2', {
						"sex": sex,
						"phone": phone,
						"email": email,
						"username": user,
						"faddress": adrs,
						"borndate": born
					}, function(r) {
						if (r) {
							alert("修改成功！");
						} else {
							alert("修改失败！");
						}
						location.href = 'myinfo.html';
					},"json");
				} else {
					formData.append("files", f1);
					$.ajax({
						url: 'http://localhost:80/ct/updateinfo1',
						type: 'post',
						data: formData,
						contentType: false,
						processData: false,
						success: function(res) {
							if (res) {
								alert("修改成功！");
							} else {
								alert("修改失败！");
							}
							location.href = 'myinfo.html';
						}
					})
				}	
			})

			//验证旧密码
			$("#oldpwd").blur(function() {
				$.post('http://localhost:80/ct/yzpwd', {
					"password": $(this).val()
				}, function(res) {
					if (res) {
						$("#yzold").css("display", "inline");
						$("#yzold").attr("class", "label label-success");
						$("#yzold").text("验证成功");
						$("#newpwd").attr("disabled", false);
						$("#tpwd").attr("disabled", false);
					} else {
						$("#yzold").css("display", "inline");
						$("#yzold").attr("class", "label label-danger");
						$("#yzold").text("验证失败");
						$("#newpwd").attr("disabled", true);
						$("#tpwd").attr("disabled", true);
					}
				}, "json");
			})

			//修改密码
			$("#form2").submit(function(event) {
				event.preventDefault(); //阻止表单提交	
				let old = $("#oldpwd").val();
				let newpwd = $("#newpwd").val();
				let tpwd = $("#tpwd").val();
				if (newpwd != tpwd) {
					alert("两次密码输入不一致！");
					return;
				}
				$.post('http://localhost:80/ct/updatepwd', {
					"password": newpwd
				}, function(res) {
					if (res) {
						alert("密码修改成功！");
					} else {
						alert("密码修改失败！");
					}
					location.href = 'myinfo.html';
				}, "json");
			})

			mypet();
			//显示我的宠物
			function mypet() {
				$.post('http://localhost:80/ct/mypetinfo', function(res) {
					$(".mypetinfo").children().remove();
					$("#aupid").children().first().siblings().remove();
					$("#supid").children().first().siblings().remove();
					console.log(res);
					$(res.records).each(function(i, e) {
						let trs = "<tr>" +
							"<td><img src='../images/" + e.up_file + "' width='50px' /></td>" +
							"<td>" + e.upname + "</td>" +
							"<td>" + e.upsex + "</td>" +
							"<td>" + e.upborndate + "</td>" +
							"<td><button class='btn btn-info btn-sm mypetdetail' onclick='showDialog(" +
							e.upid +
							")' data-toggle='modal' data-target='#myModal'>详情</button></td>" +
							"</tr>";
						$(".mypetinfo").append(trs);						
							let ops = "<option value='" + e.upid + "'>" + e.upname + "</option>";
							$("#aupid").append(ops);
							$("#supid").append(ops);
					})
				}, "json");
			}

			petpz();
			//品种
			function petpz() {
				$.post('http://localhost:80/ct/petpz', function(r) {
					$("#petpz1").children().first().siblings().remove();
					$("#petpz2").children().first().siblings().remove();
					$(r).each(function(i, e) {
						let options = "<option value='" + e.bid + "'>" + e.bname + "</option>";
						$("#petpz1").append(options);
						$("#petpz2").append(options);
						$("#bid").append(options);
					});
				}, "json");
			}

			//修改宠物信息
			$(".update").click(function(event) {
				event.preventDefault(); //阻止表单提交			 
				var formData = new FormData();
				if ($("#petname").val() == '' || $("#petsex").val() == '' || $("#petborn").val() == '' || $(
						"#petpz1").val() == 0 || $("#petemail").val() == '' || $("#petadrs").val() == '') {
					alert("修改信息不能为空！");
					return;
				}
				//邮箱验证
				var yx = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/;
				if (!(yx.test($("#petemail").val()))) {
					alert("邮箱格式不规范！");
					return;
				}
				formData.append("upname", $("#petname").val());
				formData.append("upsex", $("#petsex").val());
				formData.append("upborndate", $("#petborn").val());
				formData.append("upbid", $("#petpz1").val());
				formData.append("upemail", $("#petemail").val());
				formData.append("upaddress", $("#petadrs").val());
				formData.append("upid", $("#upid").val());
				let f = document.getElementById('file-petdetail');
				let f1 = f.files[0];
				formData.append("files", f1);
				$.ajax({
					url: 'http://localhost:80/ct/updatepetinfo',
					type: 'post',
					data: formData,
					contentType: false,
					processData: false,
					success: function(res) {
						console.log(res);
						if (res) {
							alert("修改成功！");
						} else {
							alert("修改失败！");
						}
						location.href = 'myinfo.html';
					}
				})
			})

			//添加宠物信息
			$(".addpet").click(function(event) {
				event.preventDefault(); //阻止表单提交	
				if ($("#pname").val() == '' || $("#psex").val() == '' || $("#pborn").val() == '' || $(
						"#petpz2").val() == 0 || $("#pemail").val() == '' || $("#padrs").val() == '') {
					alert("添加信息不能为空！");
					return;
				}
				//邮箱验证
				var yx = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/;
				if (!(yx.test($("#pemail").val()))) {
					alert("邮箱格式不规范！");
					return;
				}
				var formData = new FormData();
				formData.append("pname", $("#pname").val());
				formData.append("upsex", $("#psex").val());
				formData.append("upborndate", $("#pborn").val());
				formData.append("upbid", $("#petpz2").val());
				formData.append("upemail", $("#pemail").val());
				formData.append("upaddress", $("#padrs").val());
				let f = document.getElementById('file-petadd');
				let f1 = f.files[0];
				formData.append("files", f1);
				$.ajax({
					url: 'http://localhost:80/ct/addpetinfo',
					type: 'post',
					data: formData,
					contentType: false,
					processData: false,
					success: function(res) {
						console.log(res);
						if (res) {
							alert("添加成功！");
						} else {
							alert("添加失败！");
						}
						location.href = 'myinfo.html';
					}
				})
			})

			//显示我的订单
			myorder();
			function myorder() {
				$.post('http://localhost:80/ct/myorder', function(res) {
					console.log(res);
					$(".myorder").children().remove();
					$(res.records).each(function(i, e) {
						let str = "";
						let cla = "";
						if (e.orderstatus == 0) {
							str = "未支付";
							cla = "label label-warning";		
						} else if (e.orderstatus == 1) {
							str = "已支付";
							cla = "label label-success";
						} else if (e.orderstatus == 2) {
							str = "订单失效";							
							cla = "label label-danger";
						}
						let trs = "<tr>" +
							"<td>" + e.orderid + "</td>" +
							"<td>" + e.oname + "</td>" +
							"<td><span class='" + cla + "'>" + str + "</span></td>" +
							"<td>" +
							"<button class='btn btn-info btn-sm' onclick='showdetail(" + e.oid +
							")' data-toggle='modal' data-target='#myModal3'>详情</button>" +
							"<button class='btn btn-danger btn-sm' onclick='del(" + e.oid +
							")'>删除</button>" +
							"</td>" +
							"</tr>";
						$(".myorder").append(trs);
					})
				}, "json");
			}
			//显示店铺（下拉框）
			petshop();
			function petshop() {
				$.post('http://localhost:80/ct/petshop', function(res) {
					console.log(res);
					$("#dp").children().first().siblings().remove();
					$(res).each(function(i, e) {
						let trs = "<option value='" + e.psid + "'>" + e.psname + "</option>";
						$("#dp").append(trs);
					})
				}, "json");
			}
			//我的领养
			myadopt();
			function myadopt() {
				$.post('http://localhost:80/ct/myadopt', function(res) {
					console.log(res);
					$(".adopt1").children().remove();
					$(res.records).each(function(i, e) {
						let trs = "<tr>" +
							"<td>" + (i+1)+ "</td>" +
							"<td>" + e.atitle + "</td>" +
							"<td>" + e.adate + "</td>" +
							"<td>" +
							"<button class='btn btn-info btn-sm' onclick='adoptdetail(" + e.aid +
							")' data-toggle='modal' data-target='#myModal4'>详情</button>" +
							"<button class='btn btn-danger btn-sm deladmin' onclick='deladopt(" + e
							.aid + ")' style='outline: none;'>删除</button>" +
							"</td>" +
							"</tr>";
						$(".adopt1").append(trs);
					})
				}, "json");
			}

			//修改领养详情信息
			$(".updateadopt").click(function(event) {
				event.preventDefault(); //阻止表单提交			 
				var formData = new FormData();
				if ($("#adopttitle").val() == '' || $("#petdz").val() == '' || $("#lxr").val() == '' || $(
						"#lxdh").val() == 0 || $("#fabudate").val() == '' || $("#aupid").val() == 0) {
					alert("修改信息不能为空！");
					return;
				}
				//手机格式验证
				var telStr = /^[1]([3-9])[0-9]{9}$/;
				if (!(telStr.test($("#lxdh").val()))) {
					alert("手机格式不规范！");
					return;
				}
				formData.append("atitle", $("#adopttitle").val());
				formData.append("petdz", $("#petdz").val());
				formData.append("lxr", $("#lxr").val());
				formData.append("lxdh", $("#lxdh").val());
				formData.append("fbdate", $("#fabudate").val());
				formData.append("upid", $("#aupid").val());
				formData.append("aid", $("#aid").val());
				let f = document.getElementById('file-adopt');
				let f1 = f.files[0];
				formData.append("files", f1);
				$.ajax({
					url: 'http://localhost:80/ct/upadoptdetail',
					type: 'post',
					data: formData,
					contentType: false,
					processData: false,
					success: function(res) {
						console.log(res);
						if (res) {
							alert("修改成功！");
						} else {
							alert("修改失败！");
						}
						location.href = 'myinfo.html';
					}
				})
			})

			//显示寻宠启事
			seek();
			function seek() {
				$.post('http://localhost:80/ct/myseek', function(res) {
					console.log(res);
					$(".foster1").children().remove();
					$(res.records).each(function(i, e) {
						let trs = "<tr>" +
							"<td>" + (i+1)+ "</td>" +
							"<td>" + e.seektitle + "</td>" +
							"<td>" + e.seekdate + "</td>" +
							"<td>" +
							"<button class='btn btn-info btn-sm' onclick='sdetail(" + e.seekid +
							")' data-toggle='modal' data-target='#myModal5'>详情</button>" +
							"<button class='btn btn-danger btn-sm deladmin' onclick='delseek(" + e
							.seekid + ")' style='outline: none;'>删除</button>" +
							"</td>" +
							"</tr>";
						$(".foster1").append(trs);
					})
				}, "json");

			}

			//修改寻宠详情信息
			$(".updateseek").click(function(event) {
				event.preventDefault(); //阻止表单提交			 
				var formData = new FormData();
				if ($("#stitle").val() == '' || $("#sdz").val() == '' || $("#sdh").val() == 0 || $("#sdate")
					.val() == '' || $("#supid").val() == 0) {
					alert("修改信息不能为空！");
					return;
				}
				//手机格式验证
				var telStr = /^[1]([3-9])[0-9]{9}$/;
				if (!(telStr.test($("#sdh").val()))) {
					alert("手机格式不规范！");
					return;
				}
				formData.append("stitle", $("#stitle").val());
				formData.append("sdz", $("#sdz").val());
				formData.append("sdh", $("#sdh").val());
				formData.append("sdate", $("#sdate").val());
				formData.append("upid", $("#supid").val());
				formData.append("seekid", $("#seekid").val());
				formData.append("detail", $("#sdetail").text());
				let f = document.getElementById('file-seek');
				let f1 = f.files[0];
				formData.append("files", f1);
				$.ajax({
					url: 'http://localhost:80/ct/upsdetail',
					type: 'post',
					data: formData,
					contentType: false,
					processData: false,
					success: function(res) {
						console.log(res);
						if (res) {
							alert("修改成功！");
						} else {
							alert("修改失败！");
						}
						location.href = 'myinfo.html';
					}
				})
			})

			//显示寻宠启事
			found();
			function found() {
				$.post('http://localhost:80/ct/myfound', function(res) {
					console.log(res);
					$(".founds").children().remove();
					$(res.records).each(function(i, e) {
						let trs = "<tr>" +
							"<td>" + (i+1)+ "</td>" +
							"<td>" + e.foundtitle + "</td>" +
							"<td>" + e.founddate + "</td>" +
							"<td>" +
							"<button class='btn btn-info btn-sm' onclick='fdetail(" + e.fid +
							")' data-toggle='modal' data-target='#myModal6'>详情</button>" +
							"<button class='btn btn-danger btn-sm deladmin' onclick='delfound(" + e
							.fid + ")' style='outline: none;'>删除</button>" +
							"</td>" +
							"</tr>";
						$(".founds").append(trs);
					})
				}, "json");
			}

			//修改招领详情信息
			$(".updatefound").click(function(event) {
				event.preventDefault(); //阻止表单提交			 
				var formData = new FormData();
				if ($("#ftitle").val() == '' || $("#fdz").val() == '' || $("#fdh").val() == 0 || $("#fdate")
					.val() == '' || $("#bid").val() == 0) {
					alert("修改信息不能为空！");
					return;
				}
				//手机格式验证
				var telStr = /^[1]([3-9])[0-9]{9}$/;
				if (!(telStr.test($("#fdh").val()))) {
					alert("手机格式不规范！");
					return;
				}
				formData.append("ftitle", $("#ftitle").val());
				formData.append("fdz", $("#fdz").val());
				formData.append("fdh", $("#fdh").val());
				formData.append("fdate", $("#fdate").val());
				formData.append("bid", $("#bid").val());
				formData.append("fid", $("#fid").val());
				formData.append("detail", $("#fdetail").text());
				let f = document.getElementById('file-found');
				let f1 = f.files[0];
				formData.append("files", f1);
				$.ajax({
					url: 'http://localhost:80/ct/upfdetail',
					type: 'post',
					data: formData,
					contentType: false,
					processData: false,
					success: function(res) {
						console.log(res);
						if (res) {
							alert("修改成功！");
						} else {
							alert("修改失败！");
						}
						location.href = 'myinfo.html';
					}
				})
			})

			//我的帖子
			myforum();
			function myforum() {
				$.post('http://localhost:80/ct/myforum', function(res) {
					console.log(res);
					$(".forum1").children().remove();
					$(res.records).each(function(i, e) {
						let trs = "<tr>" +
							"<td>" + (i+1)+"</td>" +
							"<td>" + e.forumtitle + "</td>" +
							"<td>" + e.fbdate + "</td>" +
							"<td>" +
							"<button class='btn btn-info btn-sm' onclick='forumdetail(" + e.forumid +
							")' data-toggle='modal' data-target='#myModal7'>详情</button>" +
							"<button class='btn btn-danger btn-sm deladmin' onclick='delforum(" + e
							.forumid + ")' style='outline: none;'>删除</button>" +
							"</td>" +
							"</tr>";
						$(".forum1").append(trs);
					})
				}, "json");
			}

			//修改帖子详情信息
			$(".updateforum").click(function(event) {
				event.preventDefault(); //阻止表单提交			 
				var formData = new FormData();
				if ($("#forumtitle").val() == '' || $("#fbdate").val() == '') {
					alert("修改信息不能为空！");
					return;
				}
				formData.append("forumtitle", $("#forumtitle").val());
				formData.append("fbdate", $("#fbdate").val());
				formData.append("forumid", $("#forumid").val());
				// formData.append("audit", $("#audit").attr("audit"));//状态
				formData.append("detail", $("#forumdetail").text());
				let f = document.getElementById('file-forum');
				let f1 = f.files[0];
				formData.append("files", f1);
				$.ajax({
					url: 'http://localhost:80/ct/upforumdetail',
					type: 'post',
					data: formData,
					contentType: false,
					processData: false,
					success: function(res) {
						console.log(res);
						if (res) {
							alert("修改成功！");
						} else {
							alert("修改失败！");
						}
						location.href = 'myinfo.html';
					}
				})
			})

			//我的收藏
			mycoll();
			function mycoll() {
				$.post('http://localhost:80/ct/mycoll', function(res) {
					console.log(res);
					$(".coll").children().remove();
					$(res.records).each(function(i, e) {
						let trs = "<tr>" +
							"<td>" + (i+1)+"</td>" +
							"<td>...</td>" +
							"<td>" + e.codate + "</td>" +
							"<td>" +
							"<button class='btn btn-info btn-sm' onclick='forumdetail2(" + e
							.co_forumid +
							")' data-toggle='modal' data-target='#myModal7'>详情</button>" +
							"<button class='btn btn-danger btn-sm deladmin' onclick='delforum(" + e
							.collectionid + ")' style='outline: none;'>删除</button>" +
							"</td>" +
							"</tr>";
						$(".coll").append(trs);
					})
				}, "json");
			}


			//我发送
			mymsg();
			function mymsg() {
				$.post('http://localhost:80/ct/mymsg', function(res) {
					console.log(res);
					$(".mymsg1").children().remove();
					$(res.records).each(function(i, e) {
						let str = "";
						let isread = "";
						let cla = "";
						if (e.c_aid != 0) {
							str = "求领养";
						}
						if (e.c_seekid != 0) {
							str = "找宠物";
						}
						if (e.c_fid != 0) {
							str = "找主人";
						}
						let trs = "<tr>" +
							"<td>" + (i+1)+ "</td>" +
							"<td>" + str + "</td>" +
							"<td>" + e.msgdate + "</td>" +
							"<td>"+
							"<button class='btn btn-info btn-sm' onclick='msgdetail(" + e.cid +")' data-toggle='modal' data-target='#myModal8'>查看</button>" +
							"<button class='btn btn-danger btn-sm deladmin' onclick='delmymsg(" + e.cid + ")' style='outline: none;'>删除</button>" +
							"</td>" +
							"</tr>";
						$(".mymsg1").append(trs);
					})
				}, "json");
			}
			
			//我接收
			youmsg();
			function youmsg() {
				$.post('http://localhost:80/ct/youmsg', function(res) {
					console.log(res);
					$(".youmsg1").children().remove();
					$(res.records).each(function(i, e) {
						let str = "";
						if (e.c_aid != 0) {
							str = "求领养";
						}
						if (e.c_seekid != 0) {
							str = "找宠物";
						}
						if (e.c_fid != 0) {
							str = "找主人";
						}
						if (e.isread == 0) {
							isread = "未读";
							cla = "label label-warning";
						}
						if (e.isread == 1) {
							isread = "已读";
							cla = "label label-success";
						}
						let trs = "<tr>" +
							"<td>" + (i+1)+ "</td>" +
							"<td>" + str + "</td>" +
							"<td>" + e.msgdate + "</td>" +
							"<td><span class='" + cla + "'>" + isread + "</span></td>" +
							"<td>" +
							"<button class='btn btn-info btn-sm' onclick='youmsgdetail(" + e.cid +
							")' data-toggle='modal' data-target='#myModal9'>查看</button>" +
							"<button class='btn btn-danger btn-sm deladmin' onclick='delyoumsg(" + e
							.cid + ")' style='outline: none;'>删除</button>" +
							"</td>" +
							"</tr>";
						$(".youmsg1").append(trs);
					})
				}, "json");
			}

		    //我的喜欢
			mylike();
			function mylike(){
				$.post('http://localhost:80/ct/mylike', function(res) {
					console.log(res);
					$(".mylikeinfo").children().remove();
					$(res.records).each(function(i, e) {
						let trs = "<tr>" +
							"<td>" + (i+1)+"</td>" +
							"<td>...</td>" +
							"<td>" + e.likedate + "</td>" +
							"<td>" +
							"<button class='btn btn-info btn-sm' onclick='forumdetail3(" + e
							.like_forumid +
							")' data-toggle='modal' data-target='#myModal10'>详情</button>" +
							"<button class='btn btn-danger btn-sm deladmin' onclick='delforum(" + e
							.likeid + ")' style='outline: none;'>删除</button>" +
							"</td>" +
							"</tr>";
						$(".mylikeinfo").append(trs);
					})
				}, "json");
			}
		
		})

		//点击显示宠物详情
		function showDialog(id) {
			$.post('http://localhost:80/ct/petdetail', {
				"upid": id
			}, function(r) {
				console.log("de:" + r);
				$("#upid").val(r.upid);
				$("#petname").val(r.upname);
				$("#petsex").val(r.upsex);
				$("#petborn").val(r.upborndate);
				$("#petadrs").val(r.up_address);
				$("#petemail").val(r.up_email);
				$("#petpz1").val(r.up_bid);
				$("#img-petdetail").attr("src", "../images/" + r.up_file);
			}, "json");
		}

		//点击显示订单详情
		function showdetail(id) {
			$.post('http://localhost:80/ct/orderdetail', {
				"oid": id
			}, function(r) {
				console.log("de:" + r);
				$("#orderid").val(r.orderid);
				$("#ordername").val(r.oname);
				$("#moneys").val(r.moneys);
				$("#dp").val(r.o_psid);
				$("#petnum").val(r.petnum);
				$("#startdate").val(r.startdate);
				$("#enddate").val(r.enddate);
				$("#orderdate").val(r.odate);
				$("#remark").val(r.remark);
				let str = "";
				let cla = "";
				if (r.orderstatus == 0) {
					str = "未支付";	
					cla = "label label-warning";
				} else if (r.orderstatus == 1) {
					str = "已支付";
					cla = "label label-success";
				} else if (r.orderstatus == 2) {
					str = "订单失效";
					cla = "label label-danger";
				}
				$("#zhifu2").attr("stu", r.orderstatus);
				$("#orderstatus").text(str);
				$("#orderstatus").attr("class", cla);
			}, "json");
		}
		//点击删除订单
		function del(id) {
			if (!confirm("确定要删除该订单吗？"))
				return;
			$.post('http://localhost:80/ct/delorder', {
				"oid": id
			}, function(r) {
				if (r) {
					alert("删除成功！");
				} else {
					alert("删除失败！");
				}
				location.href = 'myinfo.html';
			}, "json");
		}

		//点击显示领养详情
		function adoptdetail(id) {
			$.post('http://localhost:80/ct/adoptdetail', {
				"aid": id
			}, function(r) {
				console.log("de:" + r);
				$("#adopttitle").val(r.atitle);
				$("#petdz").val(r.address);
				$("#lxr").val(r.contact);
				$("#lxdh").val(r.aphone);
				$("#fabudate").val(r.adate);
				$("#aupid").val(r.upid);
				$("#adoptdetail").text(r.adetail);
				$("#img-adopt").attr("src", "../images/" + r.afile + "");
				$("#aid").val(r.aid);
			}, "json");
		}
		//点击删除订单
		function deladopt(id) {
			if (!confirm("确定要删除该求领养请求吗？"))
				return;
			$.post('http://localhost:80/ct/deladopt', {
				"aid": id
			}, function(r) {
				if (r) {
					alert("删除成功！");
				} else {
					alert("删除失败！");
				}
				location.href = 'myinfo.html';
			}, "json");
		}


		//点击显示寻宠详情
		function sdetail(id) {
			$.post('http://localhost:80/ct/sdetail', {
				"seekid": id
			}, function(r) {
				console.log("de:" + r);
				$("#stitle").val(r.seektitle);
				$("#sdz").val(r.seekaddress);
				$("#sdh").val(r.seekphone);
				$("#sdate").val(r.seekdate);
				$("#supid").val(r.s_upid);
				$("#sdetail").text(r.seekdetail);
				$("#img-seek").attr("src", "../images/" + r.seekfile + "");
				$("#seekid").val(r.seekid);
			}, "json");
		}
		//点击删除寻宠启事
		function delseek(id) {
			if (!confirm("确定要删除该求寻宠启事吗？"))
				return;
			$.post('http://localhost:80/ct/delseek', {
				"seekid": id
			}, function(r) {
				if (r) {
					alert("删除成功！");
				} else {
					alert("删除失败！");
				}
				location.href = 'myinfo.html';
			}, "json");
		}

		//点击显示招领详情
		function fdetail(id) {
			$.post('http://localhost:80/ct/fdetail', {
				"fid": id
			}, function(r) {
				$("#ftitle").val(r.foundtitle);
				$("#fdz").val(r.foundaddress);
				$("#fdh").val(r.foundphone);
				$("#fdate").val(r.founddate);
				$("#bid").val(r.f_bid);
				$("#fdetail").text(r.founddetail);
				$("#img-found").attr("src", "../images/" + r.foundfile + "");
				$("#fid").val(r.fid);
			}, "json");
		}
		//点击删除招领启事
		function delfound(id) {
			if (!confirm("确定要删除该求寻宠启事吗？"))
				return;
			$.post('http://localhost:80/ct/delfound', {
				"fid": id
			}, function(r) {
				if (r) {
					alert("删除成功！");
				} else {
					alert("删除失败！");
				}
				location.href = 'myinfo.html';
			}, "json");
		}

		//点击显示帖子详情
		function forumdetail(id) {
			$.post('http://localhost:80/ct/forumdetail', {
				"forumid": id
			}, function(r) {
				console.log(r);
				$("#forumtitle").val(r.forumtitle);
				$("#fbdate").val(r.fbdate);
				$("#forumdetail").text(r.forumdetail);
				$("#img-forum").attr("src", "../images/" + r.fb_file + "");
				$("#forumid").val(r.forumid);

				let str = "";
				let cla = "";
				if (r.fb_audit == 0) {
					str = "未审核";
					cla = "label label-warning";
				} else if (r.fb_audit == 1) {
					str = "审核通过";
					cla = "label label-success";
				} else if (r.fb_audit == 2) {
					str = "审核失败";
					cla = "label label-danger";
				}
				$("#audit").attr("audit", r.fb_audit);
				$("#audit").text(str);
				$("#audit").attr("class", cla);
				$("#forumtitle").attr("disabled", false);
				$("#fbdate").attr("disabled", false);
				$("#forumdetail").attr("disabled", false);
				$(".updateforum").css("display", "inline-block");
			}, "json");
		}

		//点击删除帖
		function delforum(id) {
			if (!confirm("确定要删除该求帖子吗？"))
				return;
			$.post('http://localhost:80/ct/delforum', {
				"forumid": id
			}, function(r) {
				if (r) {
					alert("删除成功！");
				} else {
					alert("删除失败！");
				}
				location.href = 'myinfo.html';
			}, "json");
		}

		//点击显示收藏帖子详情
		function forumdetail2(id) {
			$.post('http://localhost:80/ct/forumdetail', {
				"forumid": id
			}, function(r) {
				console.log(r);
				$("#forumtitle").val(r.forumtitle);
				$("#fbdate").val(r.fbdate);
				$("#forumdetail").text(r.forumdetail);
				$("#img-forum").attr("src", "../images/" + r.fb_file + "");
				$("#forumid").val(r.forumid);
				let str = "";
				let cla = "";
				if (r.fb_audit == 0) {
					str = "未审核";
					cla = "label label-warning";
				} else if (r.fb_audit == 1) {
					str = "审核通过";
					cla = "label label-success";
				} else if (r.fb_audit == 2) {
					str = "审核失败";
					cla = "label label-danger";
				}
				$("#audit").attr("audit", r.fb_audit);
				$("#audit").text(str);
				$("#audit").attr("class", cla);
				$("#forumtitle").attr("disabled", true);
				$("#fbdate").attr("disabled", true);
				$("#forumdetail").attr("disabled", true);
				$(".updateforum").css("display", "none");
			}, "json");
		}

        //点击显示点赞帖子详情
        function forumdetail3(id) {
        	$.post('http://localhost:80/ct/forumdetail', {
        		"forumid": id
        	}, function(r) {
        		console.log(r);
        		$("#forumtitle1").val(r.forumtitle);
        		$("#fbdate1").val(r.fbdate);
        		$("#forumdetail1").text(r.forumdetail);
        		$("#img-forum1").attr("src", "../images/" + r.fb_file + "");
        		$("#forumid1").val(r.forumid);
        		let str = "";
        		let cla = "";
        		if (r.fb_audit == 0) {
        			str = "未审核";
        			cla = "label label-warning";
        		} else if (r.fb_audit == 1) {
        			str = "审核通过";
        			cla = "label label-success";
        		} else if (r.fb_audit == 2) {
        			str = "审核失败";
        			cla = "label label-danger";
        		}
        		$("#audit1").attr("audit", r.fb_audit);
        		$("#audit1").text(str);
        		$("#audit1").attr("class", cla);
        		$("#forumtitle1").attr("disabled", true);
        		$("#fbdate1").attr("disabled", true);
        		$("#forumdetail1").attr("disabled", true);
        		$(".updateforum1").css("display", "none");
        	}, "json");
        }
        

		//点击显示发送消息详情
		function msgdetail(id) {
			$(".upread").attr("cid", id);
			$.post('http://localhost:80/ct/msgdetail', {
				"cid": id
			}, function(r) {
				let uid = r.c_u_id;
				$.post('http://localhost:80/ct/userdetail', {
					"uid": uid
				}, function(re) {
					$("#yhjs").val(re.username);
				}, "json");
				$("#msgdate").val(r.msgdate);
				$("#msgdetail").text(r.cdetail);
			}, "json");
		}
		//点击查看详情后修改已读
		function upread(that) {
			$.post('http://localhost:80/ct/upread', {
				"cid": that.attr("cid"),
				"read": 1
			}, function(r) {
				location.href = 'myinfo.html';
			},"json");
		}

		//点击删除我发送的消息
		function delmymsg(id) {
			if (!confirm("确定要删除该求消息记录吗？"))
				return;
			$.post('http://localhost:80/ct/delmymsg', {
				"cid": id
			}, function(r) {
				if (r) {
					alert("删除成功！");
				} else {
					alert("删除失败！");
				}
				location.href = 'myinfo.html';
			}, "json");
		}

		//点击显示接收消息详情
		function youmsgdetail(id) {
            $(".upyouid").attr("cid", id);
			$.post('http://localhost:80/ct/youmsgdetail', {
				"cid": id
			}, function(r) {
				let uid = r.c_uid;
				$.post('http://localhost:80/ct/userdetail', {
					"uid": uid
				}, function(rs) {
					$("#yhfs").val(rs.username);
				}, "json");
				$("#msgdate1").val(r.msgdate);
				$("#youmsgdetail").text(r.cdetail);
			}, "json");
		}
		//点击删除我发送的消息
		function delyoumsg(id) {
			if (!confirm("确定要删除该求消息记录吗？"))
				return;
			$.post('http://localhost:80/ct/delyoumsg', {
				"cid": id
			}, function(r) {
				if (r) {
					alert("删除成功！");
				} else {
					alert("删除失败！");
				}
				location.href = 'myinfo.html';
			}, "json");
		}

		//支付未支付订单
		function zhifu() {
			let orderid = $("#orderid").val();
			let oname = $("#ordername").val();
			let moneys = $("#moneys").val();
			let remark = $("#remark").val();
			if ($("#zhifu2").attr("stu") == 0 || $("#zhifu2").attr("stu") == "0") {
				$.post('http://localhost:80/ct/pay', {
					"orderid": orderid,
					"moneys": moneys,
					"remark": remark,
					"oname": oname
				}, function(res) {
					console.log(res);
					$('#box1').prepend(res);
				}, "text");
			} else if ($("#zhifu2").attr("stu") == 1 || $("#zhifu2").attr("stu") == "1") {				
				alert("订单已支付！");
			} else if ($("#zhifu2").attr("stu") == 2 || $("#zhifu2").attr("stu") == "2") {				
				alert("订单已失效！");
			}
		}
	</script>

	<!-- 图片预览 -->
	<script type="text/javascript">
		var upload = function(c, d) {
			"use strict";
			var $c = document.querySelector(c),
				$d = document.querySelector(d),
				file = $c.files[0],
				reader = new FileReader();
			reader.readAsDataURL(file);
			reader.onload = function(e) {
				$d.setAttribute("src", e.target.result);
			};
		};
	</script>


</html>